﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ResourceClientStatusException.cs" company="XamlNinja">
//   2011 Richard Griffin and Ollie Riches
// </copyright>
// <summary>
//   The resource client status exception.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace WP7Contrib.Communications
{
    using System;

    /// <summary>
    /// Resource client status exception.
    /// </summary>
    public sealed class ResourceClientStatusException : Exception
    {
        /// <summary>
        /// Gets Status.
        /// </summary>
        public Status Status { get; private set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="ResourceClientStatusException"/> class.
        /// </summary>
        public ResourceClientStatusException()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ResourceClientStatusException"/> class.
        /// </summary>
        /// <param name="message">
        /// The message of the exception.
        /// </param>
        public ResourceClientStatusException(string message) : base(message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ResourceClientStatusException"/> class.
        /// </summary>
        /// <param name="message">
        /// The message of the exception.
        /// </param>
        /// <param name="exn">
        /// The inner exception.
        /// </param>
        public ResourceClientStatusException(string message, Exception exn) : base(message, exn)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ResourceClientStatusException"/> class.
        /// </summary>
        /// <param name="status">
        /// The status.
        /// </param>
        /// <param name="exn">
        /// The inner exception.
        /// </param>
        public ResourceClientStatusException(Status status, Exception exn) : base(exn.Message, exn)
        {
            this.Status = status;
        }
    }
}